#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date    : 2016-04-07 17:02:17
# @Author  : Gtlions Lai (gtlions.l@qq.com)
# @Link    : http://blog.csdn.net/gtlions
# @Version : 1.0.0
"""summarization ahout this script.

detail ahout this script

    Class(): summarization about Class
    ...
    function(): summarization about function
    ...
"""

import unittest
import urllib


class TestUrl(unittest.TestCase):
    def setUp(self):
        self.urls = [
            'http://www.baidu.com', 'http://www.163.com', 'http://g.org.cn', 'http://g.org.cn']

    def test_url(self):
        for url in self.urls:
            returnhttpcode = urllib.urlopen(url).getcode()
            self.assertEqual(returnhttpcode, 200)

if __name__ == '__main__':
    unittest.main()
